package com.tongtech.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tongtech.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 工单日志表 workOrder
 *
 * @author xingyc
 */
public class WorkOrderLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 工单日志id
     */
    private Long logId;

    /**
     * 工单日志项目id
     */
    private Long projectId;

    /**
     * 工单日志工单id
     */
    private Long workOrderId;

    /**
     * 工单日志名称
     */
    private String title;

    /**
     * 内容(md格式)
     */
    private String content;

    /**
     * 时长(h)
     */
    private Float duration;

    /**
     * 工单日志启动状态: 0-未开始 1-已开始 2-已暂停
     */
    private String logStatus;

    /**
     * 上次
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date prevStartTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date prevSuspendTime;

    /**
     * 工单日志状态:0-正常,1-停用
     */
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public Long getWorkOrderId() {
        return workOrderId;
    }

    public void setWorkOrderId(Long workOrderId) {
        this.workOrderId = workOrderId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Float getDuration() {
        return duration;
    }

    public void setDuration(Float duration) {
        this.duration = duration;
    }

    public String getLogStatus() {
        return logStatus;
    }

    public void setLogStatus(String logStatus) {
        this.logStatus = logStatus;
    }

    public Date getPrevStartTime() {
        return prevStartTime;
    }

    public void setPrevStartTime(Date prevStartTime) {
        this.prevStartTime = prevStartTime;
    }

    public Date getPrevSuspendTime() {
        return prevSuspendTime;
    }

    public void setPrevSuspendTime(Date prevSuspendTime) {
        this.prevSuspendTime = prevSuspendTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("logId", getLogId())
                .append("projectId", getProjectId())
                .append("workOrderId", getWorkOrderId())
                .append("title", getTitle())
                .append("content", getContent())
                .append("duration", getDuration())
                .append("prevStartTime", getPrevStartTime())
                .append("prevSuspendTime", getPrevSuspendTime())
                .append("logStatus", getLogStatus())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
